package newcoder.lx_句子逆序;

import java.util.Scanner;

/**
 * @Author Mr.wang
 * @Description 将一个英文语句以单词为单位逆序排放。例如“I am a boy”，逆序排放后为“boy a am I”
 * 所有单词之间用一个空格隔开，语句中除了英文字母外，不再包含其他字符
 * @Date 2020-04-11
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String line = scanner.nextLine();
            String[] split = line.split(" ");
            for (int i = split.length -1 ; i >= 0 ; i--) {
                System.out.print(split[i]+" ");
            }
        }
    }
}
